package org.footballmanager.pandafootball.system.service;

import org.footballmanager.pandafootball.system.domain.FootPerson;
import org.footballmanager.pandafootball.system.domain.FootRewardDetail;
import org.footballmanager.pandafootball.system.form.impl.FootRewardDetailSearchForm;
import org.springframework.ui.Model;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.List;

public interface FootRewardDetailService extends BaseService<FootRewardDetail> {
    /**
     * 查询
     *
     * @param entityname          实体类名
     * @param map                 参数
     * @param footRewardDetailSearchForm 条件
     */
    void search(String entityname, Model map, FootRewardDetailSearchForm footRewardDetailSearchForm);

    /**
     * 删除所有
     *
     * @param footRewardDetailSearchForm 条件
     * @param request             请求
     */
    void deleteAll(FootRewardDetailSearchForm footRewardDetailSearchForm, HttpServletRequest request);

    /**
     * 翻页查询
     * @param footRewardDetailSearchForm 条件
     * @return 抽奖记录列表
     */
    List<FootRewardDetail> findall(FootRewardDetailSearchForm footRewardDetailSearchForm);

    /**
     * 根据主键查询记录
     * @param id 抽奖记录主键
     * @return 抽奖记录
     */
    FootRewardDetail get(Serializable id);

    /**
     * 根据用户主键获取今日抽取记录列表
     * @param userId 用户主键
     * @return 今日抽取记录列表
     */
    List<FootRewardDetail> findTodayDataByUserId(Long userId);

    /**
     * 免费抽奖
     * @param userId 用户主键
     * @param request 请求
     */
    FootPerson rewardFree(Long userId, HttpServletRequest request);

    /**
     * 收费抽奖
     * @param userId 用户主键
     * @param request 请求
     */
    FootPerson reward(Long userId, HttpServletRequest request);
}